var html = require("html-webpack-plugin");
var Ex = require("extract-text-webpack-plugin");
module.exports = {
	entry: __dirname+"/src/js/main.js",
	output: {
		path: __dirname+"/dist",
		filename:"[name].js"
	},
	module:{
		rules:[
			{
				test:/\.css$/,
				use:Ex.extract({
					fallback:'style-loader',
					use:'css-loader'
				})
			}
		]
	},
	plugins:[
		new html({template:'./src/index.html'}),
		new Ex("[name].css")
	]
}
